1. Field
The following description relates to a code overlay technique for operating a program larger than an available memory.
2. Description of the Related Art
Most computing apparatuses are provided with storage for storing programs and memory is for loading the stored programs so that the programs may be executed. For example, in an embedded system such as a mobile phone, a firmware such as bootstrap code is stored in a storage using a NAND flash memory. Upon system boot-up, the firmware is copied to a memory, such as a static random access memory (SRAM), and the code is run.
With the increase of functions mounted on a computing apparatus, the size of programs are increasing, however, the size of a memory is often fixed. Thus, programs larger than the size of the memory may need to be executed.
For example, to run a program that is larger than the size of a memory, the size of a memory may be increased. As another example, there is a technique referred to as code overlaying, which allows a program larger than a memory to run without the use of added memory.
Using code overlaying, different code blocks of a program are placed on the same memory region, allowing a program to be larger than a memory.
However, because different code blocks use the same memory region, the number of memory copies is increased. This increase in the number of memory copies may degrade the overall performance of a system.